package com.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.demo.entity.SpotOrder;
import com.demo.entity.TripOrder;
import com.demo.mapper.SpotOrderMapper;
import com.demo.service.SpotOrderService;
import org.springframework.stereotype.Service;

@Service
public class SpotOrderServiceImpl extends ServiceImpl<SpotOrderMapper, SpotOrder> implements SpotOrderService {
    @Override
    public SpotOrder getBySpotOrderId(Long userId) {
        LambdaQueryWrapper<SpotOrder> queryWrapper = new LambdaQueryWrapper<SpotOrder>();
        queryWrapper.eq(SpotOrder::getUserId, userId);
        return baseMapper.selectOne(queryWrapper);



    }
    @Override
    public boolean save(SpotOrder spotOrder) {
        return super.save(spotOrder);
    }
}
